package net.helix.element;

import org.lwjgl.opengl.GL11;

import net.helix.engine.library.items.LibraryItem;
import net.helix.engine.timeline.Timeline;

public class Element_Clip2D extends ViewNodeElement implements TimelineElement, FrameElement {
	private Timeline timeline;
	private float frame = 0;
	public Element_Clip2D(LibraryItem item){
		super(item);
		
		timeline = new Timeline(true);
		frame = 0;
	}
	@Override
	public void render() {
		//GL11.glPushMatrix();
		// TODO: Properties
		
		timeline.renderAtFrame(frame);
		//GL11.glPopMatrix();
	}

	@Override
	public Timeline getTimeline() {
		return timeline;
	}
	@Override
	public float getFrame() {
		return frame;
	}
	@Override
	public void setFrame(float frame) {
		this.frame = frame;
	}
	@Override
	public String getSymbolName() {
		// TODO: get the name of this clip from the library.
		return "Clip";
	}
}
